<?php
    $sql = "SELECT td_value FROM text_data WHERE td_id=3";
    $result = $db->Execute($sql);
    $result->Close();
?>

<!-- elRTE -->
<script src="editor/elrte-1.1/js/elrte.min.js" type="text/javascript" charset="utf-8"></script>
<link rel="stylesheet" href="editor/elrte-1.1/css/elrte.full.css" type="text/css" media="screen" charset="utf-8" />
<!-- elfinder -->
<script src="editor/elfinder-1.1/js/elfinder.min.js" type="text/javascript" charset="utf-8"></script>
<link rel="stylesheet" href="editor/elfinder-1.1/css/elfinder.css" type="text/css" media="screen" charset="utf-8" />
    
<script type="text/javascript">
    $(function() {
        $("#tabs").tabs();
    });
    
    $(document).ready(function(){
        
        $('#editor').elrte( {
                cssClass : 'el-rte',
                height   : 320,
                toolbar  : 'complete',
                cssfiles : ['editor/elrte-1.1/css/elrte-inner.css'],
                fmOpen : function(callback) {
                    $('<div id="myelfinder" />').elfinder({
                        url : 'editor/elfinder-1.1/connectors/php/connector.php',
                        dialog : { width : 900, modal : true, title : 'Files' }, // open in dialog window
                        closeOnEditorCallback : true, // close after file select
                        editorCallback : callback     // pass callback to file manager
                    });
                }
        });
        
        $('.button').click(function(){
            $("#success_msg").css('display','none');
            $("#error_msg").css('display','none');
            $('.submit_indicator').css('display','inline');
            $('#careerEditFrm').attr('method','post');
            $('#careerEditFrm').attr('target','ajaxIfrm');
            $('#careerEditFrm').submit();
        });
        
    });
    
</script>
<h3 class="pageTitle">จัดการหน้า สมัครงาน</h3>
<div id="tabs" class="careerEdit">
    
    <ul>
        <li id="car_"><a href="#tabs-1" title="Add files">สมัครงาน</a></li>
    </ul>
    
    <div id="tabs-1" class="careerEditFrm">
        <form name="careerEditFrm" id="careerEditFrm" action="function/career.php">
            <div id="editor">
                <?php echo $result->fields['td_value']; ?>
            </div>
            <input type="button" class="button" value="Save" />
            &nbsp;<img src="images/ajax-loader.gif" class="ajax_load_img submit_indicator"/>
        </form>
        <div class="information canhide png_bg ajax_msg"></div>
        <div class="fail canhide png_bg ajax_msg" id="error_msg"></div>
        <div class="success canhide ajax_msg" id="success_msg"><p></p></div>
    </div>
    
    <iframe name="ajaxIfrm" class="ajaxIfrm" ></iframe>
</div>